Printing Phases
QuickDraw GX sends specific printing messages during each of the four phases of printing. Figure 1-2 shows what happens to document data in these phases of printing.Figure 1-2 The phases of QuickDraw GX printing
The four phases of printing are:
The four phases of printing can be, but are not necessarily, sequential. In some cases, these phases are interleaved. For example, when the same computer is performing both formatting and output of a document, the application and spooling phases are interleaved, and the imaging and device communications phases are interleaved. The application initiates the printing of each page, and that output is written to a spool file. When the printer is ready, each page is despooled, rendered, and sent to the device.
- The application phase of printing, during which the application calls QuickDraw GX and interacts with the user by displaying dialog boxes to establish printing parameters, such as page orientation and paper type. Examples of messages sent during this phase are
GXStartJob
,GXPrintPage
, andGXFinishJob
.- The spooling phase of printing, during which the application spools the document pages to disk, in preparation for printing. QuickDraw GX sends messages during this phase to notify you when each page is about to be spooled. Examples of messages sent during this phase are
GXCreateSpoolFile
,GXSpoolPage
, andGXSpoolData
.- The imaging phase of printing, during which each previously spooled page is rendered into a form that can be printed on the output device.
The imaging phase is actually composed of two processes:
- Despooling, during which each previously spooled page is read from the spool file. Examples of the despooling messages are
GXCountPages
,GXDespoolPage
,GXDespoolData
,GXDespoolResource
, andGXCloseSpoolFile
.- Rendering, during which each despooled page is converted into image data that can be printed by the output device. Some rendering messages, known as universal imaging messages, are sent for all imaging systems. Examples of these are the
GXImageJob
,GXImagePage
, andGXRenderPage
messages. Other messages sent during rendering depend on which imaging system is in use.
Examples of raster rendering messages areGXRasterDataIn
,GXRasterLineFeed
, andGXRasterPackageBitmap
. Examples of PostScript rendering messages areGXPostScriptQueryPrinter
,GXPostScriptInitializePrinter
,GXPostScriptStreamFont
, andGXPostScriptDoPageSetup
. Examples of vector rendering messages areGXVectorPackageShape
,GXVectorLoadPens
, andGXVectorVectorizeShape
.
- During the device communications phase of printing, the data that represents the rendered form of each page is sent to the output device. Messages sent during this phase include
GXOpenConnection
,GXStartSendPage
,GXWriteData
, andGXCheckStatus
. You can only communicate with the printing device during this phase of printing, which means that you must override the device communications messages to communicate with the user regarding printer supplies such as paper.
Printing extensions and printer drivers can override any of the messages that QuickDraw GX sends during each of these printing phases, allowing you a tremendous degree of flexibility in controlling printing on a specific device.
- Note
- The spooling, imaging, and device communications phases of printing can occur on different devices. For example, an application can spool a document to a printer server on a network, which might then image the document to a disk that is taken to a printing service and printed on a high-resolution printer.
![]()
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help